/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Image
容器镜像服务镜像相关接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKCr/CrApiModel.h>


@implementation CrCheckRegistryNameRequest
-(id) initWithRegion:(NSString *)regionId
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.registryName = registryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.version = version;
    self.registryName = registryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registryName = [dictionary objectForKey:@"registryName"];
    return self;
} 

@end
@implementation CrCreateRegistryRequest
-(id) initWithRegion:(NSString *)regionId
registryName:(NSString*)registryName
descriptionValue:(NSString*)descriptionValue { 
    self.regionId = regionId;
    self.registryName = registryName;
    self.descriptionValue = descriptionValue;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
registryName:(NSString*)registryName
descriptionValue:(NSString*)descriptionValue { 
    self.regionId = regionId;
    self.version = version;
    self.registryName = registryName;
    self.descriptionValue = descriptionValue;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registryName = [dictionary objectForKey:@"registryName"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    return self;
} 

@end
@implementation CrDescribeRegistryRequest
-(id) initWithRegion:(NSString *)regionId
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.registryName = registryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.version = version;
    self.registryName = registryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registryName = [dictionary objectForKey:@"registryName"];
    return self;
} 

@end
@implementation CrCheckRegistryNameResult
-(id) initWithCode:(NSNumber*) code
        reason:(NSString*)reason { 
    self.code = code;               
    self.reason = reason;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self reason])
    {
        [result setValue:[self reason] forKey:@"reason"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.reason = [dictionary objectForKey:@"reason"];
    return self;
} 

@end
@implementation CrDeleteRegistryRequest
-(id) initWithRegion:(NSString *)regionId
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.registryName = registryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.version = version;
    self.registryName = registryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registryName = [dictionary objectForKey:@"registryName"];
    return self;
} 

@end
@implementation CrReleaseAuthorizationTokenRequest
-(id) initWithRegion:(NSString *)regionId
authorizationToken:(NSString*)authorizationToken
forceAll:(NSNumber*)forceAll
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.authorizationToken = authorizationToken;
    self.forceAll = forceAll;
    self.registryName = registryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
authorizationToken:(NSString*)authorizationToken
forceAll:(NSNumber*)forceAll
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.version = version;
    self.authorizationToken = authorizationToken;
    self.forceAll = forceAll;
    self.registryName = registryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self authorizationToken])
    {
        [result setValue:[self authorizationToken] forKey:@"authorizationToken"];
    }
    if([self forceAll])
    {
        [result setValue:[self forceAll] forKey:@"forceAll"];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.authorizationToken = [dictionary objectForKey:@"authorizationToken"];
    self.forceAll = [dictionary objectForKey:@"forceAll"];
    self.registryName = [dictionary objectForKey:@"registryName"];
    return self;
} 

@end
@implementation CrGetAuthorizationTokenRequest
-(id) initWithRegion:(NSString *)regionId
expiredAfterHours:(NSNumber*)expiredAfterHours
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.expiredAfterHours = expiredAfterHours;
    self.registryName = registryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
expiredAfterHours:(NSNumber*)expiredAfterHours
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.version = version;
    self.expiredAfterHours = expiredAfterHours;
    self.registryName = registryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self expiredAfterHours])
    {
        [result setValue:[self expiredAfterHours] forKey:@"expiredAfterHours"];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.expiredAfterHours = [dictionary objectForKey:@"expiredAfterHours"];
    self.registryName = [dictionary objectForKey:@"registryName"];
    return self;
} 

@end
@implementation CrGetAuthorizationTokenResult
-(id) initWithAuthorizationToken:(NSString*) authorizationToken
        loginCmdLine:(NSString*)loginCmdLine
        expiresAt:(NSString*)expiresAt { 
    self.authorizationToken = authorizationToken;               
    self.loginCmdLine = loginCmdLine;               
    self.expiresAt = expiresAt;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self authorizationToken])
    {
        [result setValue:[self authorizationToken] forKey:@"authorizationToken"];
    }
    if([self loginCmdLine])
    {
        [result setValue:[self loginCmdLine] forKey:@"loginCmdLine"];
    }
    if([self expiresAt])
    {
        [result setValue:[self expiresAt] forKey:@"expiresAt"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.authorizationToken = [dictionary objectForKey:@"authorizationToken"];
    self.loginCmdLine = [dictionary objectForKey:@"loginCmdLine"];
    self.expiresAt = [dictionary objectForKey:@"expiresAt"];
    return self;
} 

@end
@implementation CrDeleteRepositoryRequest
-(id) initWithRegion:(NSString *)regionId
registryName:(NSString*)registryName
repositoryName:(NSString*)repositoryName { 
    self.regionId = regionId;
    self.registryName = registryName;
    self.repositoryName = repositoryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
registryName:(NSString*)registryName
repositoryName:(NSString*)repositoryName { 
    self.regionId = regionId;
    self.version = version;
    self.registryName = registryName;
    self.repositoryName = repositoryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    if([self repositoryName])
    {
        [result setValue:[self repositoryName] forKey:@"repositoryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registryName = [dictionary objectForKey:@"registryName"];
    self.repositoryName = [dictionary objectForKey:@"repositoryName"];
    return self;
} 

@end
@implementation CrCheckRepositoryNameRequest
-(id) initWithRegion:(NSString *)regionId
registryName:(NSString*)registryName
repositoryName:(NSString*)repositoryName { 
    self.regionId = regionId;
    self.registryName = registryName;
    self.repositoryName = repositoryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
registryName:(NSString*)registryName
repositoryName:(NSString*)repositoryName { 
    self.regionId = regionId;
    self.version = version;
    self.registryName = registryName;
    self.repositoryName = repositoryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    if([self repositoryName])
    {
        [result setValue:[self repositoryName] forKey:@"repositoryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registryName = [dictionary objectForKey:@"registryName"];
    self.repositoryName = [dictionary objectForKey:@"repositoryName"];
    return self;
} 

@end
@implementation CrCreateRepositoryRequest
-(id) initWithRegion:(NSString *)regionId
repositoryName:(NSString*)repositoryName
descriptionValue:(NSString*)descriptionValue
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.repositoryName = repositoryName;
    self.descriptionValue = descriptionValue;
    self.registryName = registryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
repositoryName:(NSString*)repositoryName
descriptionValue:(NSString*)descriptionValue
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.version = version;
    self.repositoryName = repositoryName;
    self.descriptionValue = descriptionValue;
    self.registryName = registryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self repositoryName])
    {
        [result setValue:[self repositoryName] forKey:@"repositoryName"];
    }
    if([self descriptionValue])
    {
        [result setValue:[self descriptionValue] forKey:@"description"];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.repositoryName = [dictionary objectForKey:@"repositoryName"];
    self.descriptionValue = [dictionary objectForKey:@"description"];
    self.registryName = [dictionary objectForKey:@"registryName"];
    return self;
} 

@end
@implementation CrCheckRepositoryNameResult
-(id) initWithCode:(NSNumber*) code
        reason:(NSString*)reason { 
    self.code = code;               
    self.reason = reason;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self reason])
    {
        [result setValue:[self reason] forKey:@"reason"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.code = [dictionary objectForKey:@"code"];
    self.reason = [dictionary objectForKey:@"reason"];
    return self;
} 

@end
@implementation CrDeleteImageRequest
-(id) initWithRegion:(NSString *)regionId
imageDigest:(NSString*)imageDigest
imageTag:(NSString*)imageTag
imageTagStatus:(NSString*)imageTagStatus
registryName:(NSString*)registryName
repositoryName:(NSString*)repositoryName { 
    self.regionId = regionId;
    self.imageDigest = imageDigest;
    self.imageTag = imageTag;
    self.imageTagStatus = imageTagStatus;
    self.registryName = registryName;
    self.repositoryName = repositoryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
imageDigest:(NSString*)imageDigest
imageTag:(NSString*)imageTag
imageTagStatus:(NSString*)imageTagStatus
registryName:(NSString*)registryName
repositoryName:(NSString*)repositoryName { 
    self.regionId = regionId;
    self.version = version;
    self.imageDigest = imageDigest;
    self.imageTag = imageTag;
    self.imageTagStatus = imageTagStatus;
    self.registryName = registryName;
    self.repositoryName = repositoryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self imageDigest])
    {
        [result setValue:[self imageDigest] forKey:@"imageDigest"];
    }
    if([self imageTag])
    {
        [result setValue:[self imageTag] forKey:@"imageTag"];
    }
    if([self imageTagStatus])
    {
        [result setValue:[self imageTagStatus] forKey:@"imageTagStatus"];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    if([self repositoryName])
    {
        [result setValue:[self repositoryName] forKey:@"repositoryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.imageDigest = [dictionary objectForKey:@"imageDigest"];
    self.imageTag = [dictionary objectForKey:@"imageTag"];
    self.imageTagStatus = [dictionary objectForKey:@"imageTagStatus"];
    self.registryName = [dictionary objectForKey:@"registryName"];
    self.repositoryName = [dictionary objectForKey:@"repositoryName"];
    return self;
} 

@end
@implementation CrDescribeQuotasResult
-(id) initWithQuotas:(NSArray<CrQuota*>*) quotas { 
    self.quotas = quotas;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self quotas])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self quotas] count]; i++) {
            CrQuota* item = [[self quotas] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"quotas"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* quotasArray = [dictionary objectForKey:@"quotas"];
    if(quotasArray&&![quotasArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [quotasArray count];i++)
        {
        CrQuota* item = [[CrQuota alloc]initWithDic:[quotasArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.quotas = propertyArray;
    }
    return self;
} 

@end
@implementation CrDescribeQuotasRequest
-(id) initWithRegion:(NSString *)regionId
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
  
@implementation CrDescribeQuotasResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDescribeQuotasResult* result = [[CrDescribeQuotasResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDescribeQuotasResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation CrCheckRegistryNameResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrCheckRegistryNameResult* result = [[CrCheckRegistryNameResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrCheckRegistryNameResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDeleteRegistryResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation CrDeleteRegistryResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDeleteRegistryResult* result = [[CrDeleteRegistryResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDeleteRegistryResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDescribeRegistryResult
-(id) initWithRegistry:(Registry*) registry { 
    self.registry = registry;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self registry])
    {
        [result setValue:[[self registry] dictionary]forKey:@"registry"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registry = [[Registry alloc]initWithDic:[dictionary objectForKey:@"registry"]];
    return self;
} 

@end
@implementation CrCreateRegistryResult
-(id) initWithRegistry:(Registry*) registry { 
    self.registry = registry;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self registry])
    {
        [result setValue:[[self registry] dictionary]forKey:@"registry"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.registry = [[Registry alloc]initWithDic:[dictionary objectForKey:@"registry"]];
    return self;
} 

@end
  
@implementation CrCreateRegistryResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrCreateRegistryResult* result = [[CrCreateRegistryResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrCreateRegistryResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDescribeRegistriesResult
-(id) initWithRegistries:(NSArray<Registry*>*) registries { 
    self.registries = registries;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self registries])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self registries] count]; i++) {
            Registry* item = [[self registries] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"registries"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* registriesArray = [dictionary objectForKey:@"registries"];
    if(registriesArray&&![registriesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [registriesArray count];i++)
        {
        Registry* item = [[Registry alloc]initWithDic:[registriesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.registries = propertyArray;
    }
    return self;
} 

@end
  
@implementation CrDescribeRegistriesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDescribeRegistriesResult* result = [[CrDescribeRegistriesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDescribeRegistriesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDescribeRegistriesRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation CrDescribeRegistryResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDescribeRegistryResult* result = [[CrDescribeRegistryResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDescribeRegistryResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrReleaseAuthorizationTokenResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation CrGetAuthorizationTokenResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrGetAuthorizationTokenResult* result = [[CrGetAuthorizationTokenResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrGetAuthorizationTokenResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDescribeAuthorizationTokensResult
-(id) initWithAuthorizationTokens:(NSArray<AuthorizationData*>*) authorizationTokens
        totalCount:(NSNumber*)totalCount { 
    self.authorizationTokens = authorizationTokens;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self authorizationTokens])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self authorizationTokens] count]; i++) {
            AuthorizationData* item = [[self authorizationTokens] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"authorizationTokens"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* authorizationTokensArray = [dictionary objectForKey:@"authorizationTokens"];
    if(authorizationTokensArray&&![authorizationTokensArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [authorizationTokensArray count];i++)
        {
        AuthorizationData* item = [[AuthorizationData alloc]initWithDic:[authorizationTokensArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.authorizationTokens = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation CrDescribeAuthorizationTokensResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDescribeAuthorizationTokensResult* result = [[CrDescribeAuthorizationTokensResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDescribeAuthorizationTokensResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation CrReleaseAuthorizationTokenResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrReleaseAuthorizationTokenResult* result = [[CrReleaseAuthorizationTokenResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrReleaseAuthorizationTokenResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDescribeAuthorizationTokensRequest
-(id) initWithRegion:(NSString *)regionId
filters:(NSArray<Filter*>*)filters
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.filters = filters;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.registryName = registryName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
filters:(NSArray<Filter*>*)filters
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
registryName:(NSString*)registryName { 
    self.regionId = regionId;
    self.version = version;
    self.filters = filters;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.registryName = registryName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self registryName])
    {
        [result setValue:[self registryName] forKey:@"registryName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.registryName = [dictionary objectForKey:@"registryName"];
    return self;
} 

@end
@implementation CrDescribeRepositoriesResult
-(id) initWithRepositories:(NSArray<Repository*>*) repositories
        totalCount:(NSNumber*)totalCount { 
    self.repositories = repositories;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self repositories])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self repositories] count]; i++) {
            Repository* item = [[self repositories] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"repositories"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* repositoriesArray = [dictionary objectForKey:@"repositories"];
    if(repositoriesArray&&![repositoriesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [repositoriesArray count];i++)
        {
        Repository* item = [[Repository alloc]initWithDic:[repositoriesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.repositories = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
@implementation CrDescribeRepositoriesRequest
-(id) initWithRegion:(NSString *)regionId
filters:(NSArray<Filter*>*)filters
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.filters = filters;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
filters:(NSArray<Filter*>*)filters
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.version = version;
    self.filters = filters;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    return self;
} 

@end
@implementation CrDeleteRepositoryResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation CrDescribeRepositoriesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDescribeRepositoriesResult* result = [[CrDescribeRepositoriesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDescribeRepositoriesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation CrCheckRepositoryNameResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrCheckRepositoryNameResult* result = [[CrCheckRepositoryNameResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrCheckRepositoryNameResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation CrDeleteRepositoryResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDeleteRepositoryResult* result = [[CrDeleteRepositoryResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDeleteRepositoryResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrCreateRepositoryResult
-(id) initWithRepository:(RepositoryShort*) repository { 
    self.repository = repository;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self repository])
    {
        [result setValue:[[self repository] dictionary]forKey:@"repository"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.repository = [[RepositoryShort alloc]initWithDic:[dictionary objectForKey:@"repository"]];
    return self;
} 

@end
  
@implementation CrCreateRepositoryResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrCreateRepositoryResult* result = [[CrCreateRepositoryResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrCreateRepositoryResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDescribeImagesResult
-(id) initWithImageDetails:(NSArray<ImageDetail*>*) imageDetails
        totalCount:(NSNumber*)totalCount { 
    self.imageDetails = imageDetails;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self imageDetails])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self imageDetails] count]; i++) {
            ImageDetail* item = [[self imageDetails] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"imageDetails"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* imageDetailsArray = [dictionary objectForKey:@"imageDetails"];
    if(imageDetailsArray&&![imageDetailsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [imageDetailsArray count];i++)
        {
        ImageDetail* item = [[ImageDetail alloc]initWithDic:[imageDetailsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.imageDetails = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation CrDescribeImagesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDescribeImagesResult* result = [[CrDescribeImagesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDescribeImagesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDeleteImageResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation CrDeleteImageResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
CrDeleteImageResult* result = [[CrDeleteImageResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(CrDeleteImageResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation CrDescribeImagesRequest
-(id) initWithRegion:(NSString *)regionId
filters:(NSArray<Filter*>*)filters
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.filters = filters;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
filters:(NSArray<Filter*>*)filters
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.version = version;
    self.filters = filters;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    return self;
} 

@end
 
